<%-- 
    Document   : AdminDashboard
    Created on : Feb 22, 2014, 10:39:07 AM
    Author     : Mukesh
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%
    try {
        if (session.getAttribute("uid") != null) {
            if (session.getAttribute("Course").toString().equals("1")) {
%>
<html>
    <head>
        <title>Ramgovind Automated System</title>

        <link rel="stylesheet" href="/RIT/css/bootstrap.css">
        <link rel="stylesheet" href="/RIT/css/bootstrap-responsive.css">
        <link rel="stylesheet" href="/RIT/css/jquery.fancybox.css">
        <link rel="stylesheet" href="/RIT/css/style.css">
        <link rel="stylesheet" href="/RIT/css/iconfont.css">
        
    </head>
    <body>					
       
        <%@include file="/topheader.html" %>
        <%@include file="/settingheader.html" %>
        <div class="main">
            <div class="container-fluid">

                <%@include file="/Settings/dbsidenav.html" %>
                <div class="content">

                    <div class="row-fluid">
                        <div class="span12">
                            <div class="box">
                                <div class="box-head">
                                    <h3>Edit Course</h3>
                                    <a href="Course.jsp">
                                    <button style="float: right" class="btn btn-success">View Course</button>
                                    </a>
                                </div>
                                <div class="box-content">
                                    <!---Form Start....-->
                                    <%{if(request.getParameter("id")!=null){ %>
                                    <form method="post" action="/RIT/EditCourse" class='validate form-horizontal'>
                                        <div class="control-group">
                                            <label for="course" class="control-label">Course Name</label>
                                            <div class="controls">
                                                <input type="text" name="course" id="course" class='required' value="<%=request.getParameter("course") %>" placeholder="e.g., B.tech,Mca,Bca">
                                                <input type="hidden" name="id" value="<%=request.getParameter("id") %>"> 
                                            </div>
                                        </div>

                                        <div class="control-group">
                                            <label for="cType" class="control-label">Course Type</label>
                                            <div class="controls">
                                                <select name="cType" id="cType" class='{required:true}'>
                                                    <option value="<%=request.getParameter("ctype")%>"><%if(request.getParameter("ctype").equals("1")){%>Yearly<%}else{%>Semester<%}%></option>
                                                    <option value="1">Yearly</option><
                                                    <option value="2">Semester</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label for="stream" class="control-label">Stream</label>
                                            <div class="controls">
                                                <input type="text" name="stream" id="stream" value="<%=request.getParameter("stream") %>" class='required'>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label for="period" class="control-label">No. of Semester/Year</label>
                                            <div class="controls">
                                                <div class="input-mini">
                                                    <input type="text" name="period" id="period" value="<%=request.getParameter("period") %>" class='spinner'>
                                                </div>
                                            </div>
                                        </div>


                                        <div class="controls">
                                            <input type="submit" value="Update" class='btn btn-primary'>
                                        </div>
                                    </form>
                                    <%}}%>
                                    <!---Form Ends....-->
                                </div>
                            </div>
                        </div>
                    </div>

                </div>	
            </div>
        </div>

        <script src="/RIT/js/jquery.js"></script>
        <script src="/RIT/js/less.js"></script>
        <script src="/RIT/js/bootstrap.min.js"></script>
        <script src="/RIT/js/jquery.uniform.min.js"></script>
        <script src="/RIT/js/bootstrap.timepicker.js"></script>
        <script src="/RIT/js/bootstrap.datepicker.js"></script>
        <script src="/RIT/js/chosen.jquery.min.js"></script>
        <script src="/RIT/js/jquery.fancybox.js"></script>
        <script src="/RIT/js/plupload/plupload.full.js"></script>
        <script src="/RIT/js/plupload/jquery.plupload.queue/jquery.plupload.queue.js"></script>
        <script src="/RIT/js/jquery.cleditor.min.js"></script>
        <script src="/RIT/js/jquery.inputmask.min.js"></script>
        <script src="/RIT/js/jquery.tagsinput.min.js"></script>
        <script src="/RIT/js/jquery.mousewheel.js"></script>
        <script src="/RIT/js/jquery.textareaCounter.plugin.js"></script>
        <script src="/RIT/js/ui.spinner.js"></script>
        <script src="/RIT/js/jquery.jgrowl_minimized.js"></script>
        <script src="/RIT/js/jquery.form.js"></script>
        <script src="/RIT/js/jquery.validate.min.js"></script>
        <script src="/RIT/js/bbq.js"></script>
        <script src="/RIT/js/jquery-ui-1.8.22.custom.min.js"></script>
        <script src="/RIT/js/jquery.form.wizard-min.js"></script>
        <script src="/RIT/js/jquery.cookie.js"></script>
        <script src="/RIT/js/jquery.metadata.js"></script>
        <script src="/RIT/js/custom.js"></script><script src="/RIT/js/demo.js"></script>
        <script src="/RIT/js/iconfont.js"></script>
    </body>
</html>

<%} else {
%>
<script type="text/javascript">
    alert("You Are Not Authorised");
    window.history.back();
</script>
<%             }
        } else {
            request.setAttribute("msg", "You Are Not Authorised! Please Contact to System Administrator!");
            request.setAttribute("value", "0");
            getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
        }
    } catch (Exception e) {
        request.setAttribute("msg", "Please Contact to System Administrator!");
        request.setAttribute("value", "0");
        getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
    }
%>

